<%@page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class="root61">
<head>
	<%@include file="/views/common/include/taglib.jsp"%>
	<%@include file="/views/common/include/head.jsp"%>
	<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
	<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/admin.css" source="widget" />
</head>
<body style="margin: 0px">
	<section class="mainborder">
       <section class="edit_scrollable padder">
         <div class="edit_content">
		<form id="myFrom">
			 <div class="form" >
			 <div class="item">
					<label class="col-sm-1 editlable">类型：</label>
					<div class="fl">
						<c:if test="${button.type == 2}">
						<input style="width:100px;" class="editform-control" id="ttype" value="按钮" type="text" class="text" readonly="readonly">
						</c:if>
					</div>
				</div>
				<div class="item">
					<label class="col-sm-1 editlable">按钮名：</label>
					<div class="fl">
						<input style="width:100px;" class="editform-control" id="menuName" value="${button.menuName}"
						onblur="checkButtonName()" type="text" maxlength="7" class="text" placeholder="请输入按钮名" required>
					<em class="emStyle">*</em>
					</div>
				</div>
				<div class="item">
					<label class="col-sm-1 editlable">所属系统：</label>
					<div class="fl">
						 <select id="system" class="editform-control" onblur="checkSystem()" style="height:29px;width:100px;">
	                    	<option value="-1" <c:if test="${button.system == -1 }">selected="selected"</c:if>>--所属系统--</option>
	                        <option value="1" <c:if test="${button.system == 1 }">selected="selected"</c:if>>运营/物业</option>
	                        <option value="2" <c:if test="${button.system == 2 }">selected="selected"</c:if>>商户端</option>
	                        <option value="3" <c:if test="${button.system == 3 }">selected="selected"</c:if>>业主端</option>
	                        <option value="4" <c:if test="${button.system == 4 }">selected="selected"</c:if>>配送端</option>
	                    </select>
                 		<em class="emStyle">*</em>
                   </div>
				</div>
			    <div class="item" id="parentMenuArea">
					<label class="col-sm-1 editlable">所属菜单：</label>
					<input id="menuId" type="hidden" value="${button.id }">
			   		<div class="fl">
	                    <select class="editform-control" style="height:29px;width:150px;" id="parentId" name="menuName" required>
			              <c:if test="${type == 2 }">
			              <option value="0" >请选择</option>
			              <c:forEach items="${menus}" var="item" varStatus="cStatus">
						  <option value="${item.id}"  <c:if test="${item.id == parentId}">selected="selected"</c:if>>${item.menuName}</option>
						  </c:forEach>
						  </c:if> 
	                    </select>
					</div>
				</div>
				<div class="item">
					<label class="col-sm-1 editlable">值：</label>
					<div class="fl">
						<input style="width:56%;" class="editform-control" id="bvalue" onblur="checkValue()" value="${button.value}" type="text" maxlength="50" class="text" placeholder="请输入唯一值" required>
						<em class="emStyle">*</em>
					</div>
				</div>
			</div>
		</form>
		
		</div>
		</section>
		</section>
                 
	<script type="text/javascript">
		document.getElementById("myFrom").reset();
	</script>
		<script src="${ctx}/js/controllers/system/menubutton/ButtonEditController.js" type="text/javascript"></script>
	<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
		
	</script>	
	<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
</body>
</html>
